package com.morizhang.merchanmanager.api.bean;

import java.util.HashMap;
import java.util.Map;

public class ErrorDefinitionHolder {
    private static volatile Map<String, ErrorDefinition> errorDefinitionMap = new HashMap<>();
    public static void add(String errorName, ErrorDefinition errorDefinition) {
        errorDefinitionMap.put(errorName,errorDefinition);
    }
    public static ErrorDefinition get(String errorName) {
        return errorDefinitionMap.get(errorName);
    }
}
